//
//  RecommendContent.m
//  AutoHome
//
//  Created by wqh on 15-5-10.
//  Copyright (c) 2015年 Wqh. All rights reserved.
//

#import "RecommendContent.h"

#import "RecommendModel.h"
#import "RecommendNormalDetail.h"


@interface RecommendContent ()

@end

@implementation RecommendContent

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    [self createTableView];
    [self downloadData];
    [self createRefreshView];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    RecommendModel *model = self.dataArr[indexPath.row];
    RecommendNormalDetail *vc = [[RecommendNormalDetail alloc] init];
    if ([self.info[@"title"] isEqualToString:@"视频"] || [self.info[@"title"] isEqualToString:@"原创视频"]  ) {
        vc.url = kRecommendDetailVideoUrl;
    }else if ([self.info[@"title"] isEqualToString:@"说客"] ) {
        vc.url = kRecommendDetailPersuaderUrl;
    }else if ([self.info[@"title"] isEqualToString:@"行情"] ) {
        vc.url = kRecommendDetailMarketUrl;
    }
    
    vc.model = model;
    if (self.myPageJumpBlcok) {
        self.myPageJumpBlcok(vc);
    }
    if(self.myHiddeTabBarBlock) {
        self.myHiddeTabBarBlock(YES);
    }
    
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
